﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrators/Admin.Master" AutoEventWireup="true" CodeBehind="LoaiTin.aspx.cs" Inherits="CongThongTin.Administrators.LoaiTin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
 
    <style type="text/css">
        .style1
        {
            width: 132px;
        }
        .style2
        {
            width: 182px;
        }
    </style>
 
</asp:Content>
<asp:Content ID="Content2" runat="server" 
    contentplaceholderid="ContentPlaceHolder_rightContent">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <h3>
        Loại tin tức</h3>
    <div class="custom_quoteOfDay">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <table style="width: 100%;">
            <tr>
                <td class="style2">
                    &nbsp; Tên loại tin tức:</td>
                <td>
                    &nbsp;
                    <asp:TextBox ID="tbTenLoaiTinTuc" runat="server" CssClass="sedang" 
                        Width="244px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp; Tên thể loại tin tức:</td>
                <td>
                    &nbsp;
                    <asp:DropDownList ID="ddlTenTheLoai" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;
                    <asp:Button ID="btnThemMoi" runat="server" Text="Thêm mới" CssClass="button" 
                        onclick="btnThemMoi_Click"/>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div class="clear" style="padding-left:2%;">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="data" 
            onrowcancelingedit="GridView1_RowCancelingEdit" 
            onrowdeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing" 
            onrowupdating="GridView1_RowUpdating" AllowPaging="True" 
                    DataKeyNames="MALOAITIN" onpageindexchanging="GridView1_PageIndexChanging">
            <Columns>
                <asp:TemplateField HeaderText="Mã loại tin tức">
                    <EditItemTemplate>
                        <asp:Label ID="lblMaLoaiTin" runat="server" Text='<%# Eval("MALOAITIN") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblMaLoaiTin_item" runat="server" Text='<%# Bind("MALOAITIN") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle CssClass="data" />
                    <ItemStyle CssClass="data" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Tên loại tin tức">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtTenLoaiTin" runat="server" Text='<%# Bind("TENLOAITIN") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="txtTenLoaiTin_item" runat="server" Text='<%# Bind("TENLOAITIN") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle CssClass="data" />
                    <ItemStyle CssClass="data" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Tên thể loại tin tức">
                    <EditItemTemplate>
                         <asp:Label ID="txtTenTheLoai" runat="server" 
                            Text='<%# Bind("TenTheLoaiTinTuc") %>' ></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("TenTheLoaiTinTuc") %>'></asp:Label>
                        
                    </ItemTemplate>
                    <HeaderStyle CssClass="data" />
                    <ItemStyle CssClass="data" />
                </asp:TemplateField>
                <asp:CommandField CancelText="Hủy" DeleteText="Xóa" EditText="Sửa" 
                    HeaderText="Tùy chọn" ShowEditButton="True" 
                    UpdateText="Cập Nhật" HeaderStyle-CssClass="data" 
                    ItemStyle-CssClass="data">
                <HeaderStyle CssClass="data" />
                <ItemStyle CssClass="data" />
                </asp:CommandField>
            </Columns>
        </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div id="content">
        
    </div>
</asp:Content>

